package com.haoze.nurse.vo;

import com.haoze.nurse.model.EmrCatalogEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.ArrayUtils;

import java.util.ArrayList;
import java.util.List;

@ApiModel(value = "任务节点实体类")
public class TaskNodeVO {

    @ApiModelProperty(name = "文书实体")
    private EmrFile emrFile;
    @ApiModelProperty(name = "组医嘱集合")
    private List<OrderInfo> orderInfoList;
    @ApiModelProperty(name = "节点信息")
    private PatientInfo patientInfo;
    @ApiModelProperty(name = "节点名称")
    private String nodeName;
    @ApiModelProperty(name = "节点入口类型")
    private String nodeType;
    @ApiModelProperty(name = "节点入口类型名称")
    private String nodeTypeName;
    @ApiModelProperty(name = "任务节点ID")
    private String taskNodeId;
    @ApiModelProperty(name = "特殊节点标记")
    private String specialNodeType;
    @ApiModelProperty(name = "特殊节点标记名称")
    private String specialNodeTypeName;
    @ApiModelProperty(name = "二维码")
    private String qrCode;
    @ApiModelProperty(name = "子目录")
    private List<EmrCatalogEntity> childCataLog;
    @ApiModelProperty(name = "父目录")
    private EmrCatalogEntity parentCatalog;

    public String getTaskNodeId() {
        return taskNodeId;
    }

    public void setTaskNodeId(String taskNodeId) {
        this.taskNodeId = taskNodeId;
    }

    public EmrCatalogEntity getParentCatalog() {
        return parentCatalog;
    }

    public void setParentCatalog(EmrCatalogEntity parentCatalog) {
        this.parentCatalog = parentCatalog;
    }

    public List<EmrCatalogEntity> getChildCataLog() {
        return childCataLog;
    }

    public void setChildCataLog(List<EmrCatalogEntity> childCataLog) {
        this.childCataLog = childCataLog;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    public String getSpecialNodeTypeName() {
        return specialNodeTypeName;
    }

    public void setSpecialNodeTypeName(String specialNodeTypeName) {
        this.specialNodeTypeName = specialNodeTypeName;
    }

    public String getSpecialNodeType() {
        return specialNodeType;
    }

    public void setSpecialNodeType(String specialNodeType) {
        this.specialNodeType = specialNodeType;
    }

    public String getNodeType() {
        return nodeType;
    }

    public void setNodeType(String nodeType) {
        this.nodeType = nodeType;
    }

    public String getNodeTypeName() {
        return nodeTypeName;
    }

    public void setNodeTypeName(String nodeTypeName) {
        this.nodeTypeName = nodeTypeName;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public PatientInfo getPatientInfo() {
        return patientInfo;
    }

    public void setPatientInfo(PatientInfo patientInfo) {
        this.patientInfo = patientInfo;
    }

    public EmrFile getEmrFile() {
        if (emrFile == null) {
            emrFile = new EmrFile();
        }
        return emrFile;
    }

    public void setEmrFile(EmrFile emrFile) {
        this.emrFile = emrFile;
    }

    public List<OrderInfo> getOrderInfoList() {
        if (ArrayUtils.isEmpty(orderInfoList.toArray())) {
            orderInfoList = new ArrayList<>();
        }
        return orderInfoList;
    }


    public void setOrderInfoList(List<OrderInfo> orderInfoList) {
        this.orderInfoList = orderInfoList;
    }
}
